package cn.cs.client;

import cn.cs.config.CsConfiguration;
import cn.cs.fallback.AgentFallBack;
import cn.cs.fallback.AgentLevelbPayFallBack;
import cn.cs.pojo.Agent;
import cn.cs.pojo.AgentInvoice;
import cn.cs.pojo.AgentLevelbPay;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * Created by yuexl
 */
@FeignClient(name = "cs-agent-provider", configuration = CsConfiguration.class, fallback = AgentLevelbPayFallBack.class)
public interface AgentLevelbPayClient {

    @RequestMapping(value = "/getAgentLevelbPayById", method = RequestMethod.POST)
    public AgentLevelbPay getAgentLevelbPayById(@RequestParam("id") String id) throws Exception;

    @RequestMapping(value = "/getAgentLevelbPayListByMap", method = RequestMethod.POST)
    public List<AgentLevelbPay> getAgentLevelbPayListByMap(@RequestBody Map<String, Object> param) throws Exception;

    @RequestMapping(value = "/getAgentLevelbPayCountByMap", method = RequestMethod.POST)
    public Integer getAgentLevelbPayCountByMap(@RequestBody Map<String, Object> param) throws Exception;

    @RequestMapping(value = "/addAgentLevelbPay", method = RequestMethod.POST)
    public Integer addAgentLevelbPay(@RequestBody AgentLevelbPay agentLevelbPay) throws Exception;

    @RequestMapping(value = "/modifyAgentLevelbPay", method = RequestMethod.POST)
    public Integer modifyAgentLevelbPay(@RequestBody AgentLevelbPay agentLevelbPay) throws Exception;

    @RequestMapping(value = "/deleteAgentLevelbPayById", method = RequestMethod.POST)
    public Integer deleteAgentLevelbPayById(@RequestParam("id") String id) throws Exception;

    @RequestMapping(value = "/modifyAgentInvoice", method = RequestMethod.POST)
    public Integer modifyAgentInvoice(@RequestBody AgentInvoice agentInvoice) throws Exception;

}

